//Table 3. Mechanism: Credit squeeze

use "eseefirmlevel.dta", clear


local outvar " crisis inter  lnexpeu lnexpw lnvasp "
local filename "table3"
xtivreg2 creditratio crisis , fe  cluster(firmid indyear)  
outreg2  using "`filename'", word replace label dec(3) nocons addtext(Firm FEs, YES) 
xi: xtivreg2 creditratio crisis  lnexpeu lnexpw lnvasp, fe  cluster(firmid indyear) 
outreg2   using "`filename'", word label dec(3) nocons addtext(Firm FEs, YES) 
xi: xtivreg2 creditratio crisis inter domfir lnexpeu lnexpw lnvasp, fe  cluster(firmid indyear) 
outreg2   using "`filename'", word label dec(3) nocons addtext(Firm FEs, YES) keep(crisis inter  lnexpeu lnexpw lnvasp) 
xi: xtivreg2 creditratio inter domfir i.year lnexpeu lnexpw lnvasp, fe partial(i.year) cluster(firmid indyear) 
outreg2 using "`filename'", word label dec(3) nocons addtext(Firm FEs, YES, Year FEs, YES) keep( inter lnexpeu lnexpw lnvasp )
xi: xtivreg2 creditratio inter domfir i.indyear, fe partial(i.indyear) cluster(firmid indyear)
outreg2  using "`filename'", word label dec(3) nocons addtext(Firm FEs, YES, Year FEs, NO, Ind*year FEs, YES)  keep(inter)
